﻿/* ----------------------------------------------------------------------------
 * Copyright (c) Philip Stears 
 *
 * This source code is subject to terms and conditions of the Microsoft Public 
 * License (Ms-PL).
 * 
 * By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 * 
 * To request a copy of the Microsoft Public License, send a request by email
 * to license@connectbasic.net.
 *
 * This notice must not be removed from this software.
 * ---------------------------------------------------------------------------- */

namespace ConnectBasic.Execution
{
    using Microsoft.Scripting.Runtime;

    /// <summary>
    /// Provides contextual information to running code.
    /// </summary>
    public class BasicContext
    {
        private LanguageContext mContext;
        private Scope mScope;

        /// <summary>
        /// Initializes a new instance of the <see cref="BasicContext" /> class.
        /// </summary>
        /// <param name="context">The language context the code is running in.</param>
        /// <param name="scope">The scope the code is running in.</param>
        public BasicContext(LanguageContext context, Scope scope)
        {
            mContext = context;
            mScope = scope;
        }

        /// <summary>
        /// Gets the language context the code is executing in.
        /// </summary>
        public LanguageContext Context
        {
            get { return mContext; }
        }

        /// <summary>
        /// Gets the scope the code is executing in.
        /// </summary>
        public Scope Scope
        {
            get { return mScope; }
        }
    }
}
